package com.itheima.treeset;

import java.util.TreeSet;

public class MyTreeSet {
    /*
    *不包含重复元素
    *没有带索引的方法
    * 可以将元素按规则排序*/
    public static void main(String[] args) {
        TreeSet<Student> treeSet=new TreeSet<>();
        /*treemap.add(2);
        treemap.add(3);
        treemap.add(1);
        treemap.add(5);
        treemap.add(4);
        System.out.println(treemap);*/
        treeSet.add(new Student("yyds","18"));
        treeSet.add(new Student("yyds","10"));
        treeSet.add(new Student("yyds","11"));
        treeSet.add(new Student("yy","11"));
        treeSet.add(new Student("yyds","11"));
        System.out.println(treeSet);
    }

}
